<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #box{
            width: 100px;
            height: 100px;
            background-color: red;
        }
    </style>
</head>
<body>
<div id="box"></div>
<script>
    function center(e){
        console.log(1,this,e)
    }
    document.getElementById('box').onmousemove = throttle(center,1000)
    function throttle(fn,time){
        let now = 0;
        return function (e){
            let nowDate = Date.now()
            if(nowDate-now<time)return
            now = nowDate
            fn.call(this,e)
        }
    }
</script>
</body>
</html>